package yc.star.forum.service.aiService;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
import reactor.core.publisher.Flux;

@AiService(wiringMode = AiServiceWiringMode.EXPLICIT
        ,chatModel = "openAiChatModel" // 使用模型
        ,streamingChatModel = "openAiStreamingChatModel" // 流式输出
        ,chatMemory = "chatMemory" // 聊天记忆
        ,chatMemoryProvider = "chatMemoryProvider" // 聊天记忆存储
        ,contentRetriever = "contentRetriever"  // 配置向量数据库检索对象
)
public interface ConsultantService {

    @SystemMessage(fromResource = "system.txt")
    Flux<String> chat (@MemoryId String memoryId,@UserMessage String message);

//    String chat (String message);
}